﻿namespace Cmn
{
    using System;
    using System.IO;
    using System.Reflection;
    using System.Web;

    public class AppConfig
    {
        public static string GetAppPath()
        {
            if (HttpContext.Current != null)
            {
                return HttpContext.Current.Server.MapPath("~");
            }
            return Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
        }
    }
}

